﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AndroidEditor
{
    /// <summary>
    /// 
    /// </summary>
    /// <remarks></remarks>
    class SourceSetting
    {
        /// <summary>
        /// 
        /// </summary>
        private ProjectSetting pSetting;
        /// <summary>
        /// 
        /// </summary>
        private List<FileSetting> filegroup = new List<FileSetting>();
        /// <summary>
        /// Initializes a new instance of the <see cref="SourceSetting"/> class.
        /// </summary>
        /// <param name="pSetting">The p setting.</param>
        /// <remarks></remarks>
        public SourceSetting(ProjectSetting pSetting)
        {
            // TODO: Complete member initialization
            this.pSetting = pSetting;
        }

        /// <summary>
        /// Adds the item.
        /// </summary>
        /// <param name="fSetting">The f setting.</param>
        /// <remarks></remarks>
        public void AddItem(FileSetting fSetting)
        {
            filegroup.Add(fSetting);
        }

        /// <summary>
        /// Gets the item.
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public List<FileSetting> GetItem()
        {
            return filegroup;
        }

        /// <summary>
        /// Removes the specified file node.
        /// </summary>
        /// <param name="fileNode">The file node.</param>
        /// <remarks></remarks>
        public void Remove(FileSetting fileNode)
        {
            foreach ( FileSetting  file  in filegroup)
            {
                if( file.GetFile() ==  fileNode.GetFile())
                {

                    filegroup.Remove(file);
                }
            }
        }
    }
}
